<?php
require_once 'includes/include_dao.php';

$tags = DAOFactory::getTagDAO()->queryAll(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Templates</title>
<link href="includes/css/screen.css" type="text/css" rel="stylesheet" media="screen,projection" />
</head>
<body>
<div id="layout">
  <div id="header">
    <h1 id="logo"><a href="/" title="Access the HOME page">sparked<span> </span></a></h1>
    <hr class="noscreen" />
    <div id="navigation">
      <ul>
        <li><a href="/" title="HOME">HOME</a></li>
        <li><a href="/templates.php" title="TEMPLATES">TEMPLATES</a></li>
        <li><a href="/tags.php" title="TAGS">TAGS</a></li>
      </ul>
    </div>
    <hr class="noscreen" />
  </div>
  <div class="banner-box">
    <div class="banner-box-content">
      <div class="content">
        <h2>Tags</h2>
        <p>Tags are a unique labels to access kickstart files</p>
      </div>
      <div id="box-right">
        <div id="box-right-content">
          <p></p>
        </div>
      </div>
    </div>
    <div class="banner-bottom"></div>
  </div>
  <div id="main">
    <h2>List of tags</h2>
    <?php if ($tags) : ?>
    <table>
      <tr class="table-top">
        <th scope="col">Label</th>
        <th scope="col">Date</th>
      </tr>
      <?php foreach ($tags as $tag) : ?>
      <tr>
        <td><a href="/tag.php?tag=<?php echo $tag->tag; ?>"><?php echo $tag->label; ?></a></td>
        <td><?php echo $tag->updated; ?></td>
      </tr>
      <?php endforeach; ?>
    </table>
    <?php else :
	echo 'Error - no tags';
endif;
?>
  </div>
</div>
<div id="footer">
  <div id="footer-inside">
    <p id="copyright"><a href="http://code.google.com/p/sparked/" title="View Google Code Project" target="_blank">&copy;<?php echo date('Y'); ?> All Rights Reserved.</a></p>
  </div>
  <div style="clear: both;"></div>
</div>
</body>
</html>
